Skip to content

pin(ethereum): hydrate the V4 authoriser clone address - #258

Merged
thedavidmeister merged 3 commits into
mainfrom
pin/ethereum-clone-address
Jul 22, 2026
Merged

pin(ethereum): hydrate the V4 authoriser clone address#258
thedavidmeister merged 3 commits into
mainfrom
pin/ethereum-clone-address

Conversation

@hardyjosh

@hardyjosh hardyjosh commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Hydrates STOX_PROD_AUTHORISER_V4_CLONE_ETHEREUM with the clone the Ethereum
bootstrap deployed: 0x66566cc91dEAf818859bD4b09B7903ac48998157.

Both the generator and its output change, so src/generated still regenerates
byte-for-byte and the copy-artifacts gate stays satisfied.

Verified on Ethereum mainnet

check result
deployed 92-byte EIP-1167 proxy
embedded implementation 0x2ea0d35d… — the same authoriser impl Base's clone uses
codehash vs STOX_PROD_AUTHORISER_V4_CLONE_CODEHASH 0x2089950d…, matching, and identical to Base's clone
CERTIFY / CONFISCATE_RECEIPT / DEPOSIT / WITHDRAW / SCHEDULE_CORPORATE_ACTION admin held by the Ethereum Safe 0x3840aeDa…
same roles on the deploy EOA none — the self-revoke completed

The address is not chain-unique

0x66566cc9… also has code on Base — a different clone, embedding
0x2b4a510c… (the V3-era authoriser implementation). A nonce collision, not a
redeploy.

So a consumer that reads this pin while forked to Base finds live code, passes a
code.length > 0 deployment check, and is pointed at the wrong authoriser.
Only a codehash comparison separates them. That is the concrete reason
activeChainClonePin() reverts for an unpinned chain instead of falling back:
here a fallback resolves to a real contract rather than to nothing.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 60c0cfcd-2f54-459b-8fb4-8a79aca5102b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pin/ethereum-clone-address

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hardyjosh
hardyjosh changed the base branch from pin/ethereum-safe-address to graphite-base/258 July 17, 2026 09:05
@hardyjosh
hardyjosh force-pushed the graphite-base/258 branch from 421991d to c119daa Compare July 17, 2026 09:05
@hardyjosh
hardyjosh force-pushed the pin/ethereum-clone-address branch from 6a7b8f7 to 2cd7aa7 Compare July 17, 2026 09:05
@hardyjosh
hardyjosh changed the base branch from graphite-base/258 to feat/rai-1095-ethereum-token-deploy July 17, 2026 09:05
@hardyjosh
hardyjosh force-pushed the pin/ethereum-clone-address branch from 2cd7aa7 to 41b3259 Compare July 17, 2026 09:59
@hardyjosh
hardyjosh force-pushed the feat/rai-1095-ethereum-token-deploy branch from c119daa to bb599b9 Compare July 17, 2026 09:59
@hardyjosh
hardyjosh force-pushed the feat/rai-1095-ethereum-token-deploy branch from bb599b9 to e772b40 Compare July 17, 2026 15:25
@hardyjosh
hardyjosh force-pushed the pin/ethereum-clone-address branch from 41b3259 to 2f2c066 Compare July 17, 2026 15:25
@hardyjosh
hardyjosh force-pushed the feat/rai-1095-ethereum-token-deploy branch from e772b40 to 7fdb5fe Compare July 17, 2026 15:49
@hardyjosh
hardyjosh force-pushed the pin/ethereum-clone-address branch from 2f2c066 to 7987c9a Compare July 17, 2026 15:49
@hardyjosh
hardyjosh force-pushed the feat/rai-1095-ethereum-token-deploy branch from 7fdb5fe to afe1581 Compare July 20, 2026 11:10
@hardyjosh
hardyjosh force-pushed the pin/ethereum-clone-address branch 2 times, most recently from 3582977 to b73c1ee Compare July 20, 2026 13:53
@hardyjosh
hardyjosh force-pushed the feat/rai-1095-ethereum-token-deploy branch from afe1581 to be97a2a Compare July 20, 2026 13:53
@thedavidmeister
thedavidmeister force-pushed the feat/rai-1095-ethereum-token-deploy branch from be97a2a to e9b5827 Compare July 20, 2026 14:29
@thedavidmeister
thedavidmeister force-pushed the pin/ethereum-clone-address branch from b73c1ee to 87037bb Compare July 20, 2026 14:30
@hardyjosh
hardyjosh force-pushed the pin/ethereum-clone-address branch from fb97a2a to 3a22f73 Compare July 21, 2026 22:23
@hardyjosh
hardyjosh force-pushed the feat/rai-1095-ethereum-token-deploy branch from 8d3a02f to 8c5e0fb Compare July 21, 2026 22:52
@hardyjosh
hardyjosh force-pushed the pin/ethereum-clone-address branch from 3a22f73 to 23accea Compare July 21, 2026 22:52
@hardyjosh
hardyjosh force-pushed the feat/rai-1095-ethereum-token-deploy branch from 8c5e0fb to 78c23ab Compare July 22, 2026 08:27
@hardyjosh
hardyjosh force-pushed the pin/ethereum-clone-address branch from 23accea to 4fc3f86 Compare July 22, 2026 08:27
@hardyjosh
hardyjosh changed the base branch from feat/rai-1095-ethereum-token-deploy to graphite-base/258 July 22, 2026 08:48
@hardyjosh
hardyjosh force-pushed the pin/ethereum-clone-address branch from 0166d03 to fce7843 Compare July 22, 2026 08:48
@hardyjosh
hardyjosh force-pushed the graphite-base/258 branch from 78c23ab to e035b27 Compare July 22, 2026 08:48
@hardyjosh
hardyjosh changed the base branch from graphite-base/258 to feat/rai-1095-ethereum-bootstrap July 22, 2026 08:48
@hardyjosh
hardyjosh marked this pull request as ready for review July 22, 2026 09:55
Josh Hardy and others added 2 commits July 22, 2026 09:57
DRAFT / DO NOT MERGE. Flips STOX_PROD_AUTHORISER_V4_CLONE_ETHEREUM from
address(0) to address(1) so this pin PR's diff is visible now. Replace
address(1) with the deployed Ethereum clone address to hydrate. CI is RED by
design until then (activates the authoriser leg + the placeholder guard test
in LibProdAuthoriserClonesTest against a code-less sentinel); flips green when
the real address lands.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VPs1hCTxusmaSeFKvoc4Kr
The 20260619 broadcast executed on Ethereum mainnet on 2026-07-22
(manual-broadcast run 29904077538): clone deployed at
0x66566cc91dEAf818859bD4b09B7903ac48998157 with the shared EIP-1167
codehash, all grants landed on Ethereum's token-owner Safe + the shared
service signer, deployer renounced. Hydrate
STOX_PROD_AUTHORISER_V4_CLONE_ETHEREUM in BuildPointers + the generated
lib from the address(1) placeholder.

Flip the 20260706 fork test from its stops-at-the-clone forcing-function
shape to direct pin-vs-live verification: the clone is deployed at the
pin with the pinned codehash and carries the full grant map for
Ethereum's Safe, proven against real chain state on every CI run.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VPs1hCTxusmaSeFKvoc4Kr
@hardyjosh
hardyjosh force-pushed the pin/ethereum-clone-address branch from fce7843 to 33f3b0a Compare July 22, 2026 09:58
@hardyjosh
hardyjosh force-pushed the feat/rai-1095-ethereum-bootstrap branch from e035b27 to 2388d84 Compare July 22, 2026 09:58
@thedavidmeister thedavidmeister changed the title DRAFT pin: Ethereum V4 authoriser clone address pin(ethereum): hydrate the V4 authoriser clone address Jul 22, 2026
The comment described the placeholder this commit's sibling replaced, and
claimed the shared codehash follows from a shared impl without saying why that
holds. It now also records that the address is not chain-unique: a different
clone occupies it on Base, so finding code there proves nothing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@thedavidmeister
thedavidmeister changed the base branch from feat/rai-1095-ethereum-bootstrap to main July 22, 2026 20:48
@thedavidmeister

Copy link
Copy Markdown
Contributor

Reviewed 364b314: approve

Run 29956461864 leaves one test failure — testDeployTag (0_1_8 != 0_1_16) — plus git-clean. Both inherited main-red.

The pin is verified end to end on Ethereum mainnet rather than taken from the deploy log:

check result
deployed at 0x66566cc91dEAf818859bD4b09B7903ac48998157 92-byte EIP-1167 proxy
embedded implementation 0x2ea0d35d… — the same impl Base's clone uses
codehash vs STOX_PROD_AUTHORISER_V4_CLONE_CODEHASH 0x2089950d…, matching, identical to Base's clone
CERTIFY / CONFISCATE_RECEIPT / DEPOSIT / WITHDRAW / SCHEDULE_CORPORATE_ACTION admin held by the Ethereum Safe 0x3840aeDa…
the same roles on the deploy EOA none — the self-revoke completed

That last row is the security contract of the whole bootstrap: the key deploys, grants, and ends up holding nothing.

Both defects found in review are fixed on this head: the body claimed a sentinel address(1) that was never in the diff (rewritten, along with the title, which no longer says DRAFT for a PR that is not one), and the BuildPointers comment still described the address(0) placeholder that this PR replaces.

One fact worth carrying forward: 0x66566cc9… also has code on Base — a different clone, embedding the V3-era authoriser impl 0x2b4a510c…. A nonce collision, not a redeploy. So this pin is not chain-unique, and a consumer that reads it while forked to Base finds live code and passes a code.length > 0 check while pointing at the wrong authoriser. Only the codehash separates them, which is the concrete reason #229's activeChainClonePin() reverts on an unpinned chain instead of falling back — a fallback here resolves to a real contract, not to nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants